home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
326-350
/
disk_333
/
multiplot
/
source
/
mplot_src
/
ffp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
595b
|
30 lines
/* ffp.h */
#define FFP_H 1
#include <float.h>
#include <math.h>
typedef double FFP;
extern double atof(char *);
#define atoFFP(x) (FFP)atof(x)
#ifdef MAIN_MODULE
FFP FFPLARGE = 1.0e10, FFPSMALL = 1.0e-10;
#else
extern FFP FFPLARGE, FFPSMALL;
#endif
#ifndef max
#define max(a,b) (((a)>(b)) ? (a) : (b))
#define min(a,b) (((a)>(b)) ? (b) : (a))
#endif
#define NINT(a) ((int)((a)>=0 ? (a)+0.5 : (a)-0.5))
/* a AND b DIFFER BY LESS THAN DEFAULT TOLERANCE ? */
#define FFPSAME(a,b) (abs((a)-(b)) <= FFPSMALL)
/* a AND b DIFFER BY LESS THAN c */
#define FFPNEAR(a,b,c) (abs((a)-(b)) <= (c))